import request from "@/utils/request";

export function getCityList(data) {
  return request({
    url: "/city",
    method: "get",
    params: data
  });
}
export function checkCityInfo(id) {
  return request({
    url: `/city/${id}`,
    method: "get"
  });
}

export function updateInfo(data) {
  console.log(data);
  return request({
    url: `/city/${data.id}`,
    method: "put",
    params: data
  });
}

export function removeCity(id) {
  return request({
    url: `/city/${id}`,
    method: "delete"
  });
}
export function createCity(data) {
  return request({
    url: "/city/create",
    method: "get",
    params: data
  });
}

export function getDataTotal() {
  return request({
    url: "/getAllTableNumbers",
    method: "get",
    params: { table_name: "city" }
  });
}

export function getPerson(data) {
  return request({
    url: "getWorkerInfo",
    method: "get",
    params: data
  });
}
export function updatePerson(data) {
  return request({
    url: "updateCityBelong",
    method: "put",
    params: data
  });
}
